﻿using System;
using System.Collections.Generic;
using System.Xml.Serialization;

namespace Utilify.Platform.Demo.RayTracer
{

    [Serializable]

    [XmlRootAttribute("Result")]
    public class Result
    {
        private string _fileName;

        public string FileName
        {
            get { return _fileName; }
        }



        [System.Xml.Serialization.XmlElement()]
        public int Id
        { get; set; }

        public string GUID
        { get; set; }

        [System.Xml.Serialization.XmlElement()]
        public string WorkerName
        { get; set; }

        [System.Xml.Serialization.XmlElement()]
        public string StartTime
        { get; set; }

        [System.Xml.Serialization.XmlElement()]
        public string EndTime
        { get; set; }

        [System.Xml.Serialization.XmlElement()]
        public string ExecutionTime
        { get; set; }

        [System.Xml.Serialization.XmlElement()]
        public string CalculatedResult
        { get; set; }

        
        


        public Result(int id, string workerName, string calculatedResult, String guid )
        {
            Id = id;
            GUID = guid;
            WorkerName = workerName;
            CalculatedResult = calculatedResult;
            _fileName = "Result"+id+ ".xml";
            

        }

        public Result()
        {
        }
    }
}
